<%@ page pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<script type="text/javascript">
function login(){
	var returnURL=window.location.href;
	returnURL=returnURL.replace("&", ",");
	window.location.href="login.action?returnURL="+returnURL;
}
function logout(){
	var returnURL=window.location.href;
	returnURL=returnURL.replace("&", ",");
	window.location.href="login.action?action=logout&returnURL="+returnURL;
}
</script>
<!-----nav-->
<div class="head">
  <div  class="nav-container">
    <h1 class="logo" ><a  href="index.action" > <img src="images/listindex/logo.png" /></a> </h1>
    <ul class="menu-left" >
      <li><a href="orders.action" >我的订单</a></li>
      <!--<li  ><span  class="delimiter"></span></li>-->
      <li ><a href="userComment.action" rel="nofollow">反馈留言</a></li>
    </ul>
    <div class="menu-search"  >
    <!--  
      <form name="form_search" class="search-box gray" action="" method="get" >
        <i class="icon-search-header gray"></i>
        <input  type="text"  name="sname" value="" />
      </form>
      -->
    </div>
    <ul class="nav pull-right menu-right">
    <!--  登录前的样式 -->
    <s:if test="#session.user_session==null">
      <li ><a href="regUser.action" >注册</a></li>
      <li ><a href="javascript:login();" >登录</a></li>
    </s:if>
      
      <!-- 登录成功之后的样式   -->
      <s:if test="#session.user_session!=null">
      <li><a id="topbar_cart" class="cart" rel="nofollow">美食篮子
                    <span id="topbar-cart-food-num">(空)</span>
              </a></li>
      
       <!-- <li id="msgbox-delimiter"><span class="delimiter"></span></li> -->
        <li class="dropdown user-nav">
          <a href="javascript:void(0);" id="drop3" class="dropdown-toggle" data-toggle="dropdown" ><s:property value="#session.user_session.username" /> <i class="caret"></i></a>
          <ul class="dropdown-menu" role="menu" aria-labelledby="drop3" >
            <!-- -->
            <li><a href="profile.action" rel="menuitem"><i class="icon-user"></i>个人中心</a></li>
            <li><a href="collect.action" rel="menuitem"><i class="icon-heart"></i>我的收藏</a></li>
            <!--<li><a href="address.action" rel="menuitem"><i class="icon-list"></i>我的地址</a></li>-->
            <li><a href="password.action" rel="menuitem"><i class="icon-cog"></i>修改密码</a></li>
            <!--<li><a href="/profile/security" rel="menuitem"><i class="icon-lock"></i>安全中心</a></li> -->
            <li class="divider"></li>
            <li> <a href="javascript:logout();" rel="menuitem"><i class="icon-off"></i>退出登录</a></li>
           
          </ul>
        </li>
      </s:if>	
      </ul>
  </div>
</div>
<!--  two-nav-menu  -->
<div class="nav_menu_box"  >
     <ul class="nav_menu"  >
        <li >
        <a href="resList.action?id=<s:property value="id"/>"> <s:property value="name"/> </a> &nbsp;
            <a href="index.action">[切换地址]</a> &nbsp;
            <s:property value="resName" escape="false"/>
        </li>
    </ul>
</div>
 <!--  /two-nav-menu  -->